package com.awn.weidian.demo.mapper;
import com.awn.weidian.demo.pojo.Tuser;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface ITuser{

    @Select("select * from tuser")
    public List<Tuser> showList();

    @Insert("insert into tuser(username,userpass) values(#{username},#{userpass})")
    public int addUser(Tuser tuser);
    
    @Select("select * from tuser where username=#{aa}")
    public Tuser findOne(String aa);

    @Update("update tuser set userpass=#{userpass} where username = #{username}")
    public int update(Tuser tuser);

    @Delete("delete from tuser where username = #{aa}")
    public int deleteUser(String aa);

}